home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 24 / Amiga Format AFCD24 (Feb 1998, Issue 108).iso / -seriously_amiga- / shareware / programming / c / orion / orion.h < prev    next >
C/C++ Source or Header  |  1998-01-05  |  2KB  |  69 lines

  1. #include <proto/exec.h>
  2. #include <proto/dos.h>
  3. #include <exec/memory.h>
  4. #include <exec/semaphores.h>
  5.  
  6. #include <string.h>
  7.  
  8.  
  9. #ifdef ORION_TRACK
  10.  
  11.    #ifndef ORION_NOVEC
  12.  
  13.       #define AllocVec(size,flags)  dhAllocVec(size,flags,__LINE__,__FILE__);
  14.       #define FreeVec(mem)          dhFreeVec(mem,__LINE__,__FILE__)
  15.  
  16.       VOID *dhAllocVec(ULONG size,ULONG flags,ULONG line,STRPTR file);
  17.       void dhFreeVec(VOID *mem,ULONG line,STRPTR file);
  18.  
  19.    #endif
  20.  
  21.    #ifndef ORION_NOMEM
  22.  
  23.       #define AllocMem(size,flags) dhAllocMem(size,flags,__LINE__,__FILE__)
  24.       #define FreeMem(mem,size)    dhFreeMem(mem,size,__LINE__,__FILE__)
  25.  
  26.       VOID *dhAllocMem(ULONG size,ULONG flags,ULONG line,STRPTR file);
  27.       void dhFreeMem(VOID *mem,ULONG size,ULONG line,STRPTR file);
  28.  
  29.    #endif
  30.  
  31.    #ifndef ORION_NOBITMAP
  32.  
  33.       #define AllocBitMap(x,y,depth,flags,friend) dhAllocBitMap(x,y,depth,flags,friend,__LINE__,__FILE__)
  34.       #define FreeBitMap(bm)  dhFreeBitMap(bm,__LINE__,__FILE__)
  35.  
  36.       struct BitMap *dhAllocBitMap(ULONG sizex,ULONG sizey,ULONG depth,ULONG flags,
  37.                struct BitMap *friend_bitmap,ULONG line,STRPTR file);
  38.       void dhFreeBitMap(struct BitMap *bm,ULONG line,STRPTR file);
  39.  
  40.    #endif
  41.  
  42.    #ifndef ORION_NOPOOL
  43.  
  44.       #define CreatePool(flags,psize,tsize)   dhCreatePool(flags,psize,tsize,__LINE__,__FILE__)
  45.       #define DeletePool(pool)   dhDeletePool(pool,__LINE__,__FILE__)
  46.  
  47.       #define AllocPooled(pool,size)  dhAllocPooled(pool,size,__LINE__,__FILE__)
  48.       #define FreePooled(pool,mem,size)   dhFreePooled(pool,mem,size,__LINE__,__FILE__)
  49.  
  50.       VOID *dhAllocPooled(VOID *pool,ULONG size,ULONG line,STRPTR file);
  51.       void dhFreePooled(VOID *pool,VOID *mem,ULONG size,ULONG line,STRPTR file);
  52.  
  53.       VOID *dhCreatePool(ULONG flags,ULONG p_size,ULONG t_size,ULONG line,STRPTR file);
  54.       void dhDeletePool(VOID *pool,ULONG line,STRPTR file);
  55.  
  56.    #endif
  57.  
  58.    #ifndef ORION_NOMALLOC
  59.  
  60.       #define malloc(size)       dhmalloc(size,__LINE__,__FILE__)
  61.       #define free(mem)          dhfree(mem,__LINE__,__FILE__)
  62.  
  63.       VOID *dhmalloc(ULONG size,ULONG line,STRPTR file);
  64.       void dhfree(VOID *mem,ULONG line,STRPTR file);
  65.  
  66.    #endif
  67.  
  68. #endif
  69.